package com.merak.miner.data.kafka.controller;

import com.merak.miner.data.kafka.config.KafkaProducer;
import com.merak.miner.data.persist.entity.Crm;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

@Slf4j
@RestController
@RequestMapping("/merak/data/kafka")
public class DataKafkaController {


    @Autowired
    private KafkaProducer kafkaProducer;

    @RequestMapping("/sendKafkaData")
    private  String ssendKafkaData(){
        log.info("调用kafka消息.....");
        kafkaProducer.send("test123");
        return "ok";
    }
}
